package com.atguigu.spzx.product.controller;

import com.atguigu.spzx.model.entity.product.Brand;
import com.atguigu.spzx.model.vo.common.Result;
import com.atguigu.spzx.product.service.BrandService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author LT
 * @create 2024-03-26-16:41
 */
@RestController
@RequestMapping("/api/product/brand")
public class BrandController {

    @Resource
    BrandService brandService;

    @GetMapping("/findAll")
    public Result findAllBrand(){

       List<Brand> brands = brandService.list();
        return Result.ok(brands);
    }





}
